home *** CD-ROM | disk | FTP | other *** search
- global gReviewData, gMasterData
-
- on scoreTheInput
- set the score of gReviewData to 0
- oneChoices()
- manyChoices()
- numberFills()
- set the text of member "scorefield" to string(the score of gReviewData)
- end
-
- on oneChoices
- set vScore to 0
- set vQuestions to [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25]
- set vAnswers to [5, 1, 3, 4, 2, 2, 1, 4, 3, 2, 3, 2, 1, 2, 3, 5, 1, 4, 2, 1, 1, 2, 2]
- repeat with xAnswer in vQuestions
- set vCorrect to getAt(vAnswers, getPos(vQuestions, xAnswer))
- if vCorrect = getAt(the userdata of gReviewData, xAnswer) then
- set vScore to vScore + 1
- end if
- end repeat
- set vScore to vScore * 4
- set the score of gReviewData to the score of gReviewData + vScore
- end
-
- on manyChoices
- set vScore to 0
- set vQuestions to [17]
- set vAnswers to [[2, 3, 2, 2]]
- repeat with X = 1 to count(vQuestions)
- set vCorrect to getAt(vAnswers, X)
- set vUserChoice to getAt(the userdata of gReviewData, getAt(vQuestions, X))
- if vCorrect = vUserChoice then
- set vScore to vScore + 1
- end if
- end repeat
- set vScore to vScore * 4
- set the score of gReviewData to the score of gReviewData + vScore
- end
-
- on numberFills
- set vScore to 0
- set vFields to ["qfield1", "qfield2", "qfield3", "qfield4", "qfield5", "qfield6"]
- set vAnswers to ["5", "3", "6", "1", "2", "4"]
- repeat with X = 1 to count(vFields)
- if the text of member getAt(vFields, X) of castLib "Internal" = getAt(vAnswers, X) then
- set vScore to vScore + 0.16669999999999999
- end if
- end repeat
- set vScore to vScore * 4
- set the score of gReviewData to the score of gReviewData + integer(vScore)
- end
-
- on showScore
- set vArtSprite to 7
- set vScore to the score of gReviewData
- case 1 of
- (vScore >= 80):
- set the member of sprite vArtSprite to member "great"
- goNarrator(gMasterData, "190")
- ((vScore >= 50) and (vScore < 80)):
- set the member of sprite vArtSprite to member "good"
- goNarrator(gMasterData, "191")
- (vScore < 50):
- set the member of sprite vArtSprite to member "OK"
- goNarrator(gMasterData, "192")
- end case
- set the loc of sprite vArtSprite to point(320, 240)
- end
-
- on crowdResponse
- set vQuestion to the spin of gReviewData
- if vQuestion = 1 then
- firstOneSpecial()
- end if
- set vCurrentChoice to getAt(the userdata of gReviewData, vQuestion)
- set vRealAnswers to [["5", "3", "6", "1", "2", "4"], 5, 1, 3, 4, 2, 2, 1, 4, 3, 2, 3, 2, 1, 2, 3, [2, 3, 2, 2], 5, 1, 4, 2, 1, 1, 2, 2]
- set vCorrectChoice to getAt(vRealAnswers, vQuestion)
- if vCurrentChoice = vCorrectChoice then
- puppetSound("aaahh")
- puppetSound(2, "applause short")
- else
- puppetSound("wrong")
- end if
- end
-
- on firstOneSpecial
- set vFields to ["qfield1", "qfield2", "qfield3", "qfield4", "qfield5", "qfield6"]
- set vAnswers to ["5", "3", "6", "1", "2", "4"]
- repeat with X = 1 to count(vFields)
- set vUserNumber to the text of member getAt(vFields, X)
- setAt(getAt(the userdata of gReviewData, 1), X, vUserNumber)
- end repeat
- end
-